﻿using Dapper;
using socialnetworkApp.Domain.IRepository;
using socialnetworkApp.Domain.IRepository.Repository;
using socialnetworkApp.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace socialnetworkApp.Domain.Manager
{
    public class FriendsManager
    {
        private readonly IFriendssRepository _friendssRepository; 
            public FriendsManager(IFriendssRepository  friendssRepository)
        {

            _friendssRepository = friendssRepository;
        }




        public async Task<List<Friends>> GetfriendId(Friends friends)
        {
         
            string sql = " select f.fid FROM  friends f  where f.uid=@uid;";

         return  await  _friendssRepository.Select(friends, sql);
        
        }
    }
}
